package com.green.dao.manage.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.green.common.page.Pagination;
import com.green.dao.impl.BaseDaoImpl;
import com.green.dao.manage.ComboSetupDao;
import com.green.model.manage.ComboSetup;



/**
 * 套餐设置
 * 
 */
@Repository("comboSetupDao")
public class ComboSetupDaoImpl extends BaseDaoImpl implements ComboSetupDao {

	@Override
	public int insertComboSetup(ComboSetup ct) {
		return insert("com.green.dao.manage.ComboSetupDao.insertComboSetup", ct);
	}

	@Override
	public int updateComboSetup(ComboSetup ct) {
		return update("com.green.dao.manage.ComboSetupDao.updateComboSetup", ct);
	}

	@Override
	public int deleteComboSetup(Map<String, Object> param) {
		return delete("com.green.dao.manage.ComboSetupDao.deleteComboSetup", param);
	}

	@Override
	public ComboSetup getComboSetupById(String id) {
		return (ComboSetup) super.getSqlSession().selectOne("com.green.dao.manage.ComboSetupDao.getComboSetupById",id);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ComboSetup> getComboSetupList(Map<String, Object> param) {
		return (List<ComboSetup>) this.selectList("com.green.dao.manage.ComboSetupDao.getComboSetupList", param);
	}

	@Override
	public Pagination<ComboSetup> getComboSetupPagination(
			Pagination<ComboSetup> pag, Map<String, Object> param) {
		
		return selectList("com.green.dao.manage.ComboSetupDao.getComboSetupPagination", param, pag);

	}
	
	
}
